namespace Agro.Models {
        using System;
        using SN.Data;
        
        
        /// <summary>
        /// 表名：T_User 主键列：User_ID
        /// </summary>
        [SerializableAttribute()]
        public partial class T_User : Entity {
            
            protected Int32 _User_ID;
            
            protected String _User_Code;
            
            protected String _User_Name;
            
            protected String _User_Password;
            
            protected Int32 _User_OrganizationID;
            
            protected String _User_IsLeader;
            
            protected String _User_IsAvailable;
            
            protected String _User_IsAdmin;
            
            protected String _User_Sex;
            
            protected String _User_Telephone;
            
            protected String _User_Phone;
            
            protected String _User_Post;
            
            protected String _User_Remark;
            
            protected String _User_CreateUserID;
            
            protected String _User_CreateDate;
            
            protected String _User_CreateIP;
            
            /// <summary>
            /// ID
            /// </summary>
            public Int32 User_ID {
                get {
                    return this._User_ID;
                }
                set {
                    this.OnPropertyValueChange(_.User_ID, _User_ID, value);
                    this._User_ID = value;
                }
            }
            
            /// <summary>
            /// 编号
            /// </summary>
            public String User_Code {
                get {
                    return this._User_Code;
                }
                set {
                    this.OnPropertyValueChange(_.User_Code, _User_Code, value);
                    this._User_Code = value;
                }
            }
            
            /// <summary>
            /// 用户名称
            /// </summary>
            public String User_Name {
                get {
                    return this._User_Name;
                }
                set {
                    this.OnPropertyValueChange(_.User_Name, _User_Name, value);
                    this._User_Name = value;
                }
            }
            
            /// <summary>
            /// 用户密码
            /// </summary>
            public String User_Password {
                get {
                    return this._User_Password;
                }
                set {
                    this.OnPropertyValueChange(_.User_Password, _User_Password, value);
                    this._User_Password = value;
                }
            }
            
            /// <summary>
            /// 所属部门
            /// </summary>
            public Int32 User_OrganizationID {
                get {
                    return this._User_OrganizationID;
                }
                set {
                    this.OnPropertyValueChange(_.User_OrganizationID, _User_OrganizationID, value);
                    this._User_OrganizationID = value;
                }
            }
            
            /// <summary>
            /// 是否领导
            /// </summary>
            public String User_IsLeader {
                get {
                    return this._User_IsLeader;
                }
                set {
                    this.OnPropertyValueChange(_.User_IsLeader, _User_IsLeader, value);
                    this._User_IsLeader = value;
                }
            }
            
            /// <summary>
            /// 是否有效
            /// </summary>
            public String User_IsAvailable {
                get {
                    return this._User_IsAvailable;
                }
                set {
                    this.OnPropertyValueChange(_.User_IsAvailable, _User_IsAvailable, value);
                    this._User_IsAvailable = value;
                }
            }
            
            /// <summary>
            /// 是否管理员
            /// </summary>
            public String User_IsAdmin {
                get {
                    return this._User_IsAdmin;
                }
                set {
                    this.OnPropertyValueChange(_.User_IsAdmin, _User_IsAdmin, value);
                    this._User_IsAdmin = value;
                }
            }
            
            /// <summary>
            /// 性别
            /// </summary>
            public String User_Sex {
                get {
                    return this._User_Sex;
                }
                set {
                    this.OnPropertyValueChange(_.User_Sex, _User_Sex, value);
                    this._User_Sex = value;
                }
            }
            
            /// <summary>
            /// 电话
            /// </summary>
            public String User_Telephone {
                get {
                    return this._User_Telephone;
                }
                set {
                    this.OnPropertyValueChange(_.User_Telephone, _User_Telephone, value);
                    this._User_Telephone = value;
                }
            }
            
            /// <summary>
            /// 手机
            /// </summary>
            public String User_Phone {
                get {
                    return this._User_Phone;
                }
                set {
                    this.OnPropertyValueChange(_.User_Phone, _User_Phone, value);
                    this._User_Phone = value;
                }
            }
            
            /// <summary>
            /// 职位
            /// </summary>
            public String User_Post {
                get {
                    return this._User_Post;
                }
                set {
                    this.OnPropertyValueChange(_.User_Post, _User_Post, value);
                    this._User_Post = value;
                }
            }
            
            /// <summary>
            /// 备注
            /// </summary>
            public String User_Remark {
                get {
                    return this._User_Remark;
                }
                set {
                    this.OnPropertyValueChange(_.User_Remark, _User_Remark, value);
                    this._User_Remark = value;
                }
            }
            
            /// <summary>
            /// 创建人员
            /// </summary>
            public String User_CreateUserID {
                get {
                    return this._User_CreateUserID;
                }
                set {
                    this.OnPropertyValueChange(_.User_CreateUserID, _User_CreateUserID, value);
                    this._User_CreateUserID = value;
                }
            }
            
            /// <summary>
            /// 创建时间
            /// </summary>
            public String User_CreateDate {
                get {
                    return this._User_CreateDate;
                }
                set {
                    this.OnPropertyValueChange(_.User_CreateDate, _User_CreateDate, value);
                    this._User_CreateDate = value;
                }
            }
            
            /// <summary>
            /// 创建IP
            /// </summary>
            public String User_CreateIP {
                get {
                    return this._User_CreateIP;
                }
                set {
                    this.OnPropertyValueChange(_.User_CreateIP, _User_CreateIP, value);
                    this._User_CreateIP = value;
                }
            }
            
            /// <summary>
            /// 获取实体对应的表名
            /// </summary>
            protected override Table GetTable() {
                return new Table<T_User>("T_User");
            }
            
            /// <summary>
            /// 获取实体中的标识列
            /// </summary>
            protected override Field GetIdentityField() {
                return _.User_ID;
            }
            
            /// <summary>
            /// 获取实体中的主键列
            /// </summary>
            protected override Field[] GetPrimaryKeyFields() {
                return new Field[] {
                        _.User_ID};
            }
            
            /// <summary>
            /// 获取列信息
            /// </summary>
            protected override Field[] GetFields() {
                return new Field[] {
                        _.User_ID,
                        _.User_Code,
                        _.User_Name,
                        _.User_Password,
                        _.User_OrganizationID,
                        _.User_IsLeader,
                        _.User_IsAvailable,
                        _.User_IsAdmin,
                        _.User_Sex,
                        _.User_Telephone,
                        _.User_Phone,
                        _.User_Post,
                        _.User_Remark,
                        _.User_CreateUserID,
                        _.User_CreateDate,
                        _.User_CreateIP};
            }
            
            /// <summary>
            /// 获取列数据
            /// </summary>
            protected override object[] GetValues() {
                return new object[] {
                        this._User_ID,
                        this._User_Code,
                        this._User_Name,
                        this._User_Password,
                        this._User_OrganizationID,
                        this._User_IsLeader,
                        this._User_IsAvailable,
                        this._User_IsAdmin,
                        this._User_Sex,
                        this._User_Telephone,
                        this._User_Phone,
                        this._User_Post,
                        this._User_Remark,
                        this._User_CreateUserID,
                        this._User_CreateDate,
                        this._User_CreateIP};
            }
            
            /// <summary>
            /// 给当前实体赋值
            /// </summary>
            protected override void SetValues(IRowReader reader) {
                if ((false == reader.IsDBNull(_.User_ID))) {
                    this._User_ID = reader.GetInt32(_.User_ID);
                }
                if ((false == reader.IsDBNull(_.User_Code))) {
                    this._User_Code = reader.GetString(_.User_Code);
                }
                if ((false == reader.IsDBNull(_.User_Name))) {
                    this._User_Name = reader.GetString(_.User_Name);
                }
                if ((false == reader.IsDBNull(_.User_Password))) {
                    this._User_Password = reader.GetString(_.User_Password);
                }
                if ((false == reader.IsDBNull(_.User_OrganizationID))) {
                    this._User_OrganizationID = reader.GetInt32(_.User_OrganizationID);
                }
                if ((false == reader.IsDBNull(_.User_IsLeader))) {
                    this._User_IsLeader = reader.GetString(_.User_IsLeader);
                }
                if ((false == reader.IsDBNull(_.User_IsAvailable))) {
                    this._User_IsAvailable = reader.GetString(_.User_IsAvailable);
                }
                if ((false == reader.IsDBNull(_.User_IsAdmin))) {
                    this._User_IsAdmin = reader.GetString(_.User_IsAdmin);
                }
                if ((false == reader.IsDBNull(_.User_Sex))) {
                    this._User_Sex = reader.GetString(_.User_Sex);
                }
                if ((false == reader.IsDBNull(_.User_Telephone))) {
                    this._User_Telephone = reader.GetString(_.User_Telephone);
                }
                if ((false == reader.IsDBNull(_.User_Phone))) {
                    this._User_Phone = reader.GetString(_.User_Phone);
                }
                if ((false == reader.IsDBNull(_.User_Post))) {
                    this._User_Post = reader.GetString(_.User_Post);
                }
                if ((false == reader.IsDBNull(_.User_Remark))) {
                    this._User_Remark = reader.GetString(_.User_Remark);
                }
                if ((false == reader.IsDBNull(_.User_CreateUserID))) {
                    this._User_CreateUserID = reader.GetString(_.User_CreateUserID);
                }
                if ((false == reader.IsDBNull(_.User_CreateDate))) {
                    this._User_CreateDate = reader.GetString(_.User_CreateDate);
                }
                if ((false == reader.IsDBNull(_.User_CreateIP))) {
                    this._User_CreateIP = reader.GetString(_.User_CreateIP);
                }
            }
            
            public override int GetHashCode() {
                return base.GetHashCode();
            }
            
            public override bool Equals(object obj) {
                if ((obj == null)) {
                    return false;
                }
                if ((false == typeof(T_User).IsAssignableFrom(obj.GetType()))) {
                    return false;
                }
                if ((((object)(this)) == ((object)(obj)))) {
                    return true;
                }
                return false;
            }
            
            public class _ {
                
                /// <summary>
                /// 表示选择所有列，与*等同
                /// </summary>
                public static AllField All = new AllField<T_User>();
                
                /// <summary>
                /// ID - 字段名：User_ID - 数据类型：Int32
                /// </summary>
                public static Field User_ID = new Field<T_User>("User_ID");
                
                /// <summary>
                /// 编号 - 字段名：User_Code - 数据类型：String
                /// </summary>
                public static Field User_Code = new Field<T_User>("User_Code");
                
                /// <summary>
                /// 用户名称 - 字段名：User_Name - 数据类型：String
                /// </summary>
                public static Field User_Name = new Field<T_User>("User_Name");
                
                /// <summary>
                /// 用户密码 - 字段名：User_Password - 数据类型：String
                /// </summary>
                public static Field User_Password = new Field<T_User>("User_Password");
                
                /// <summary>
                /// 所属部门 - 字段名：User_OrganizationID - 数据类型：Int32
                /// </summary>
                public static Field User_OrganizationID = new Field<T_User>("User_OrganizationID");
                
                /// <summary>
                /// 是否领导 - 字段名：User_IsLeader - 数据类型：String
                /// </summary>
                public static Field User_IsLeader = new Field<T_User>("User_IsLeader");
                
                /// <summary>
                /// 是否有效 - 字段名：User_IsAvailable - 数据类型：String
                /// </summary>
                public static Field User_IsAvailable = new Field<T_User>("User_IsAvailable");
                
                /// <summary>
                /// 是否管理员 - 字段名：User_IsAdmin - 数据类型：String
                /// </summary>
                public static Field User_IsAdmin = new Field<T_User>("User_IsAdmin");
                
                /// <summary>
                /// 性别 - 字段名：User_Sex - 数据类型：String
                /// </summary>
                public static Field User_Sex = new Field<T_User>("User_Sex");
                
                /// <summary>
                /// 电话 - 字段名：User_Telephone - 数据类型：String
                /// </summary>
                public static Field User_Telephone = new Field<T_User>("User_Telephone");
                
                /// <summary>
                /// 手机 - 字段名：User_Phone - 数据类型：String
                /// </summary>
                public static Field User_Phone = new Field<T_User>("User_Phone");
                
                /// <summary>
                /// 职位 - 字段名：User_Post - 数据类型：String
                /// </summary>
                public static Field User_Post = new Field<T_User>("User_Post");
                
                /// <summary>
                /// 备注 - 字段名：User_Remark - 数据类型：String
                /// </summary>
                public static Field User_Remark = new Field<T_User>("User_Remark");
                
                /// <summary>
                /// 创建人员 - 字段名：User_CreateUserID - 数据类型：String
                /// </summary>
                public static Field User_CreateUserID = new Field<T_User>("User_CreateUserID");
                
                /// <summary>
                /// 创建时间 - 字段名：User_CreateDate - 数据类型：String
                /// </summary>
                public static Field User_CreateDate = new Field<T_User>("User_CreateDate");
                
                /// <summary>
                /// 创建IP - 字段名：User_CreateIP - 数据类型：String
                /// </summary>
                public static Field User_CreateIP = new Field<T_User>("User_CreateIP");
            }
        }
    }
    